package com.sell.sell.entity;

import com.sell.sell.enums.OrderStatusEnum;
import com.sell.sell.enums.PayStatusEnum;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author: HZP
 * @Date: 2018-09-20 下午 5:55
 * @Version 1.0
 */
@Data
@Entity
public class OrderMaster {
    @Id
    private String orderId;

    private String buyerName;

    private String buyerPhone;

    private String buyerAddress;

    private String buyerOpenid;

    private BigDecimal orderAmount;

    private Integer orderStatus= OrderStatusEnum.NEW.getCode();

    private Integer payStatus= PayStatusEnum.WAIT.getCode();

    @CreatedDate
    private Date createTime;

    @LastModifiedDate
    private Date updateTime;
}
